﻿<Window x:Class="EffectEd.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="EffectEd" Height="768" Width="1024" 
        xmlns:HlslEdit="clr-namespace:EffectEd.HlslEditor;assembly=EffectEd.HlslEditor"
        xmlns:EffectEd="clr-namespace:EffectEd" Loaded="Window_Loaded" Closing="Window_Closing" Activated="Window_Activated" Icon="/EffectEd;component/EffectEd.ico"
        DragEnter="Window_DragEnter" Drop="Window_Drop">
    <Window.CommandBindings>
        <CommandBinding Command="{x:Static EffectEd:MainWindow.SaveCommand}" Executed="CommandBinding_Executed"  CanExecute="CommandBinding_CanExecute"/>
        <CommandBinding Command="{x:Static EffectEd:MainWindow.FindCommand}" Executed="FindCommandBinding_Executed"  CanExecute="FindCommandBinding_CanExecute"/>
        <CommandBinding Command="{x:Static EffectEd:MainWindow.CompileCommand}" Executed="CompileCommandBinding_Executed"  CanExecute="CompileCommandBinding_CanExecute"/>
    </Window.CommandBindings>
    <DockPanel LastChildFill="true">
        <Menu DockPanel.Dock="Top">
            <MenuItem Header="File">
                <MenuItem Header="New" Click="buttonNew_Click" />
                <MenuItem Header="Load..." Click="buttonLoad_Click" />
                <Separator />
                <MenuItem Header="Save" Click="buttonSave_Click" InputGestureText="Ctrl+S" />
                <MenuItem Header="Save as..." Click="MenuItemSaveAs_Click" />
                <Separator />
                <MenuItem Header="Exit" Click="MenuItem_Click_1" />
            </MenuItem>
            <MenuItem Header="Edit">
                <MenuItem Header="Undo" InputGestureText="Ctrl+Z" Click="MenuItem_Click_5" />
                <MenuItem Header="Redo" InputGestureText="Ctrl+Y" Click="MenuItem_Click_6" />
                <Separator />
                <MenuItem Header="Find" InputGestureText="Ctrl+F" Click="MenuItem_Click_4" />
            </MenuItem>
            <MenuItem Header="Compiler">
                <MenuItem Header="Compile" InputGestureText="F5" Click="MenuItem_Click_8" />
                <MenuItem Header="File settings..." Click="MenuItem_Click_9" />
            </MenuItem>
            <MenuItem Header="Tools">
                <MenuItem Header="Settings..." Click="MenuItem_Click_2" />
                <Separator />
                <MenuItem Header="Context?" Click="MenuItem_Click_7" />
            </MenuItem>
            <MenuItem Header="Help">
                <MenuItem Header="About..." Click="MenuItem_Click" />
            </MenuItem>
        </Menu>
        <ToolBarTray DockPanel.Dock="Top">
            <ToolBar Band="1" BandIndex="1">
                <Button ToolTip="New" Name="buttonNew" Click="buttonNew_Click">
                    <Image Source="Images\document_plain_new.png" Stretch="Uniform" Height="24" Width="24" />
                </Button>
                <Button ToolTip="Load" Name="buttonLoad" Click="buttonLoad_Click">
                    <Image Source="Images\folder_out.png" Height="24" Width="24" />
                </Button>
                <Button ToolTip="Save" Name="buttonSave" Click="buttonSave_Click">
                    <Image Source="Images\disk_blue.png" Height="24" Width="24" />
                </Button>
            </ToolBar>
            <ToolBar Band="1" BandIndex="2">
                <Button Name="buttonCompile" ToolTip="Test compilation using DirectX (F5 or F6)" Click="ButtonCompile_Click">
                    <Image Source="Images\compile.png" Height="24" Width="24" />
                </Button>
                <Button Content="Settings" Click="MenuItem_Click_3" ToolTip="Open compiler settings for this file" />
            </ToolBar>
        </ToolBarTray>
        <StatusBar Name="statusBar" DockPanel.Dock="Bottom">
            <StatusBarItem />
        </StatusBar>
        <ListView Name="listViewMessages" DockPanel.Dock="Bottom" Height="100" Visibility="Collapsed" ItemStringFormat="" MouseDoubleClick="listViewMessages_MouseDoubleClick">
            <ListView.View>
                <GridView>
                    <GridViewColumn Width="80" Header="Position" DisplayMemberBinding="{Binding Position}" />
                    <GridViewColumn Width="670" Header="Message" DisplayMemberBinding="{Binding Message}" />
                </GridView>
            </ListView.View>
        </ListView>
        <HlslEdit:HlslEdit x:Name="hlslEdit" />
    </DockPanel>
</Window>
